Skip to content

test(solid): Switch to explicit vitest imports#13028

Merged
andreiborza merged 1 commit intodevelopfrom
abhi-vitest-solid
Jul 24, 2024
Merged

test(solid): Switch to explicit vitest imports#13028
andreiborza merged 1 commit intodevelopfrom
abhi-vitest-solid

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Contributor

@AbhiPrasad AbhiPrasad commented Jul 23, 2024

As per https://vitest.dev/config/#globals

By default, vitest does not provide global APIs for explicitness

I think we should follow vitest defaults here and explicitly import in the APIs that we need. This refactors our Solid SDK tests to do so.

ref #11084

This change also removes environment: 'jsdom' from the vite config as it seems nothing needs this for solid. This should means that our tests are not polluted with jsdom globals, and that future writers have to explicitly opt-in to the behaviour.

Copy link
Copy Markdown
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@andreiborza andreiborza merged commit b2dded8 into develop Jul 24, 2024
@andreiborza andreiborza deleted the abhi-vitest-solid branch July 24, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants